import { Entity, PrimaryGeneratedColumn, Column, OneToOne } from "typeorm";
import { User } from "./user.entity";

@Entity()
export class Identify {
  @PrimaryGeneratedColumn()
  id: number

  @Column({ comment: '账号', unique: true })
  username: string

  @Column({ comment: '密码' })
  secret: string

  @Column({ comment: '账号注册方式' })
  type: number

  @OneToOne(type => User, user => user.identity)
  user: User
}
